home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / tex / psboxall.tex / psboxall
Text File  |  1992-12-02  |  54KB  |  1,431 lines

  1. % This text was produced with psbox's \joinfiles. You should:
  2. %-save this with a filename CONTAINING ONLY LETTERS
  3. % (say, PSBOXALL.TEX), in some uncrowded directory;
  4. %-tex PSBOXALL.TEX using Plain TeX.
  5. % You will get 6 files:
  6. %   psbox.tex (the macros),
  7. %   psbsamp.tex (the dox & sample file)
  8. %   psbREAD.ME (a quick overview)
  9. %   box.ps (a stupid sample PostScript dawing)
  10. %   psbugs.tex  (a sample bug report file)
  11. %   psboxOK.tex {an anti-bug report file: please send if satisfied!)
  12. % and furthermore do the equivalent of TeXing psbsamp.tex.
  13. %Beginning-Of-File-Named:psbox.tex
  14. %
  15. %       %%%%%%%    %%%%%        %%%%%%    %%%%%   %     %
  16. %       %      %  %             %     %  %     %   %   %
  17. %       %      %  %             %     %  %     %    % %
  18. %       %%%%%%%    %%%%%        %%%%%%   %     %     %
  19. %       %               %       %     %  %     %    % %
  20. %       %               %       %     %  %     %   %   %
  21. %       %         %%%%%%        %%%%%%    %%%%%   %     %
  22. %
  23. %       By Jean Orloff
  24. %       Comments & suggestions by e-mail: ORLOFF@surya11.cern.ch
  25. %       No modification of this file allowed if not e-sent to me.
  26. %
  27. % WHAT IS IT:
  28. % psbox is a set of machine-independent TeX macros to
  29. % 1) allow (Encapsulated) PostScript figure inclusion in all versions
  30. %    of TeX (Plain, LaTeX) on all machines using a PostScript printer
  31. % 2) facilitate the communication (e-mail, ftp, ...) of all the files
  32. %    (text, macros, figs) needed to reproduce a TeX document by grouping
  33. %    them together into a single, TeXable file.
  34. % For more info, get the file pub/TeX/psbox/PSBOXALL.TEX by anonymous
  35. %     ftp from cs.nyu.edu(=128.122.140.24)
  36. %
  37. % History:
  38. %  1.34  \readfilename=final fix for all filename scans; try \psforptips
  39. %  1.33: corrects \psnewinput for LaTeX (still fails if fname=a{b}c)
  40. %  1.32: corrects \psfordvialw and adds .TEX to PSBOXALL(!)
  41. %  1.31: adds \psfordvialw(?)
  42. %  1.30: adds \splitfile & \joinfiles for multi-file management
  43. %  1.24: fix error handling & add \psonlyboxes
  44. %  1.22: makes \drawingBox \global for use in Phyzzx
  45. %  1.21: accepts %%BoundingBox: (atend)
  46. %  1.20: tries to add \psfordvitps for the TeXPS package.
  47. %  1.10: adds \psforoztex, error handling...
  48. %2345678 1 2345678 2 2345678 3 2345678 4 2345678 5 2345678 6 2345678 7 23456789
  49. %
  50. % Checking version no to avoid multiple loadings
  51. \def\temp{1.34}%
  52. \let\tempp=\relax
  53. \expandafter\ifx\csname psboxversion\endcsname\relax
  54.   \message{PSBOX(\temp) loading}%
  55. \else
  56.     \ifdim\temp cm>\psboxversion cm
  57.       \message{PSBOX(\temp) loading}%
  58.     \else
  59.       \message{PSBOX(\psboxversion) is already loaded: I won't load
  60.         PSBOX(\temp)!}%
  61.       \let\temp=\psboxversion
  62.       \let\tempp=\endinput
  63.     \fi
  64. \fi
  65. \tempp
  66. \let\psboxversion=\temp
  67. \catcode`\@=11
  68. % Every macro likes a little privacy...
  69. %
  70. %Trying to tame the variety of \special commands for Postscript: the
  71. %  universal internal command \PSspeci@l##1##2 takes ##1 to be the
  72. %  filename and ##2 to be the integer scale factor*1000 (as for usual
  73. %   TeX \scale commands)
  74. %
  75. \def\psfortextures{%     For TeXtures on the Macintosh
  76. %-----------------
  77. \def\PSspeci@l##1##2{%
  78. \special{illustration ##1\space scaled ##2}%
  79. }}%
  80. \def\psfordvitops{%      For the DVItoPS converter on IBM mainframes
  81. %----------------
  82. \def\PSspeci@l##1##2{%
  83. \special{dvitops: import ##1\space \the\drawingwd \the\drawinght}%
  84. }}%
  85. \def\psfordvips{%      For DVIPS converter on VAX, UNIX and PC's
  86. %--------------
  87. \def\PSspeci@l##1##2{%
  88. %    \special{/@scaleunit 1000 def}% never read dox without trying!
  89. \d@my=0.1bp \d@mx=\drawingwd \divide\d@mx by\d@my% BUG! for large \drawingwd
  90. \special{PSfile=##1\space llx=\psllx\space lly=\pslly\space%
  91. urx=\psurx\space ury=\psury\space rwi=\number\d@mx
  92. }}}%
  93. \def\psforoztex{%        For the OzTeX shareware on the Macintosh
  94. %--------------
  95. \def\PSspeci@l##1##2{%
  96. \special{##1 \space
  97.       ##2 1000 div dup scale
  98.       \number-\psllx\space \number-\pslly\space translate
  99. }}}%
  100. \def\psfordvitps{%       From the UNIX TeXPS package, vers.>3.12
  101. %---------------
  102. % Convert a dimension into the number \psn@sp (in scaled points)
  103. \def\psdimt@n@sp##1{\d@mx=##1\relax\edef\psn@sp{\number\d@mx}}
  104. \def\PSspeci@l##1##2{%
  105. % psfig.psr contains the def of "startTexFig": if you can locate it
  106. % and include the correct pathname, it should work
  107. \special{dvitps: Include0 "psfig.psr"}% contains def of "startTexFig"
  108. \psdimt@n@sp{\drawingwd}
  109. \special{dvitps: Literal "\psn@sp\space"}
  110. \psdimt@n@sp{\drawinght}
  111. \special{dvitps: Literal "\psn@sp\space"}
  112. \psdimt@n@sp{\psllx bp}
  113. \special{dvitps: Literal "\psn@sp\space"}
  114. \psdimt@n@sp{\pslly bp}
  115. \special{dvitps: Literal "\psn@sp\space"}
  116. \psdimt@n@sp{\psurx bp}
  117. \special{dvitps: Literal "\psn@sp\space"}
  118. \psdimt@n@sp{\psury bp}
  119. \special{dvitps: Literal "\psn@sp\space startTexFig\space"}
  120. \special{dvitps: Include1 "##1"}
  121. \special{dvitps: Literal "endTexFig\space"}
  122. }}%
  123. \def\psfordvialw{%   Try for dvialw, a UNIX public domain
  124. %---------------
  125. \def\PSspeci@l##1##2{
  126. \special{language "PostScript",
  127. position = "bottom left",
  128. literal "  \psllx\space \pslly\space translate
  129.   ##2 1000 div dup scale
  130.   -\psllx\space -\pslly\space translate",
  131. include "##1"}
  132. }}%
  133. \def\psforptips{%   For MS-DOS; LUOMA@brandeis.bitnet
  134. %---------------
  135. \def\PSspeci@l##1##2{{
  136. \d@mx=\psurx bp
  137. \advance \d@mx by -\psllx bp
  138. \divide \d@mx by 1000\multiply\d@mx by \xscale
  139. \incm{\d@mx}
  140. \let\tmpx\dimincm
  141. \d@my=\psury bp
  142. \advance \d@my by -\pslly bp
  143. \divide \d@my by 1000\multiply\d@my by \xscale
  144. \incm{\d@my}
  145. \let\tmpy\dimincm
  146. \d@mx=-\psllx bp
  147. \divide \d@mx by 1000\multiply\d@mx by \xscale
  148. \d@my=-\pslly bp
  149. \divide \d@my by 1000\multiply\d@my by \xscale
  150. \at(\d@mx;\d@my){\special{ps:##1 x=\tmpx, y=\tmpy}}
  151. }}}%
  152. \def\psonlyboxes{%     Draft-like behaviour if none of the others works
  153. %---------------
  154. \def\PSspeci@l##1##2{%
  155. \at(0cm;0cm){\boxit{\vbox to\drawinght
  156.   {\vss\hbox to\drawingwd{\at(0cm;0cm){\hbox{({\tt##1})}}\hss}}}}
  157. }}%
  158. \def\psloc@lerr#1{%
  159. \let\savedPSspeci@l=\PSspeci@l%
  160. \def\PSspeci@l##1##2{%
  161. \at(0cm;0cm){\boxit{\vbox to\drawinght
  162.   {\vss\hbox to\drawingwd{\at(0cm;0cm){\hbox{({\tt##1}) #1}}\hss}}}}
  163. \let\PSspeci@l=\savedPSspeci@l% restore normal output for other figs!
  164. }}%
  165. %\def\psfor...  add your own!
  166. %
  167. % Some common defs
  168. %
  169. \newread\pst@mpin
  170. \newdimen\drawinght\newdimen\drawingwd
  171. \newdimen\psxoffset\newdimen\psyoffset
  172. \newbox\drawingBox
  173. \newcount\xscale \newcount\yscale \newdimen\pscm\pscm=1cm
  174. \newdimen\d@mx \newdimen\d@my
  175. \newdimen\pswdincr \newdimen\pshtincr
  176. \let\ps@nnotation=\relax
  177. {\catcode`\|=0 |catcode`|\=12 |catcode`|%=12 |catcode`~=12
  178. |catcode`#=12 |catcode`*=14
  179. |xdef|backslashother{\}*
  180. |xdef|percentother{%}*
  181. |xdef|tildeother{~}*
  182. |xdef|sharpother{#}*
  183. }%
  184. % useful to display special chars in \tt; fails for \,#,%
  185. \def\R@moveMeaningHeader#1:->{}%
  186. \def\uncatcode#1{%
  187. \edef#1{\expandafter\R@moveMeaningHeader\meaning#1}}%
  188. %
  189. \def\execute#1{#1}% NOT stupid: cs in #1 are then identified BEFORE execution
  190. \def\psm@keother#1{\catcode`#112\relax}% borrowed from latex
  191. \def\executeinspecs#1{%
  192. \execute{\begingroup\let\do\psm@keother\dospecials\catcode`\^^M=9#1\endgroup}}%
  193. \def\@mpty{}%
  194. % \if\matchin#1#2<=> \iftrue if #1 contains #2, <=>\iffalse otherwise:
  195. % \if\matchexpin: idem, but #1 & #2 are first fully expanded (no \if
  196. % inside!)
  197. % \tmpa & \tmpb contain what's before and after the occurence of #2
  198. \def\matchexpin#1#2{
  199.   \fi%
  200. %\message{(#1>#2)}
  201.   \edef\tmpb{{#2}}%
  202.   \expandafter\makem@tchtmp\tmpb%
  203.   \edef\tmpa{#1}\edef\tmpb{#2}%
  204.   \expandafter\expandafter\expandafter\m@tchtmp\expandafter\tmpa\tmpb\endm@tch%
  205.   \if\match%
  206. }%
  207. \def\matchin#1#2{%
  208.   \fi%
  209.   \makem@tchtmp{#2}%
  210.   \m@tchtmp#1#2\endm@tch%
  211.   \if\match%
  212. }%
  213. \def\makem@tchtmp#1{\def\m@tchtmp##1#1##2\endm@tch{%
  214.   \def\tmpa{##1}\def\tmpb{##2}\let\m@tchtmp=\relax%
  215.   \ifx\tmpb\@mpty\def\match{YN}%
  216.   \else\def\match{YY}\fi%
  217. }}%
  218. % converts any dimen in cm, with 1E-4 cm precision
  219. \def\incm#1{{\psxoffset=1cm\d@my=#1
  220.  \d@mx=\d@my
  221.   \divide\d@mx by \psxoffset
  222.   \xdef\dimincm{\number\d@mx.}
  223.   \advance\d@my by -\number\d@mx cm
  224.   \multiply\d@my by 100
  225.  \d@mx=\d@my
  226.   \divide\d@mx by \psxoffset
  227.   \edef\dimincm{\dimincm\number\d@mx}
  228.   \advance\d@my by -\number\d@mx cm
  229.   \multiply\d@my by 100
  230.  \d@mx=\d@my
  231.   \divide\d@mx by \psxoffset
  232.   \xdef\dimincm{\dimincm\number\d@mx}
  233. }}%
  234. %
  235. %  \ReadPSize{PSfilename} reads the dimensions of a PostScript drawing
  236. %      and stores it in \drawinght(wd)
  237. \newif\ifNotB@undingBox
  238. \newhelp\PShelp{Proceed: you'll have a 5cm square blank box instead of
  239. your graphics (Jean Orloff).}%
  240. \def\s@tsize#1 #2 #3 #4\@ndsize{
  241.   \def\psllx{#1}\def\pslly{#2}%
  242.   \def\psurx{#3}\def\psury{#4}%  needed by a crazyness of dvips!
  243.   \ifx\psurx\@mpty\NotB@undingBoxtrue% this is not a valid one!
  244.   \else
  245.     \drawinght=#4bp\advance\drawinght by-#2bp
  246.     \drawingwd=#3bp\advance\drawingwd by-#1bp
  247. %  !Units related by crazy factors as bp/pt=72.27/72 should be BANNED!
  248.   \fi
  249.   }%
  250. \def\sc@nBBline#1:#2\@ndBBline{\edef\p@rameter{#1}\edef\v@lue{#2}}%
  251. \def\g@bblefirstblank#1#2:{\ifx#1 \else#1\fi#2}%
  252. {\catcode`\%=12
  253. \xdef\B@undingBox{%%BoundingBox}}%
  254. %% is not a true comment in PostScript, even if % is!
  255. \def\ReadPSize#1{
  256.  \readfilename#1\relax
  257.  \let\PSfilename=\lastreadfilename
  258.  \openin\pst@mpin=#1\relax
  259.  \ifeof\pst@mpin \errhelp=\PShelp
  260.    \errmessage{I haven't found your postscript file (\PSfilename)}%
  261.    \psloc@lerr{was not found}%
  262.    \s@tsize 0 0 142 142\@ndsize
  263.    \closein\pst@mpin
  264.  \else
  265. % each entry in \GlobalInputList should be unique
  266.    \if\matchexpin{\GlobalInputList}{, \lastreadfilename}%
  267.    \else\xdef\GlobalInputList{\GlobalInputList, \lastreadfilename}%
  268.      \immediate\write\psbj@inaux{\lastreadfilename,}%
  269.    \fi%
  270.    \loop
  271.      \executeinspecs{\catcode`\ =10\global\read\pst@mpin to\n@xtline}%
  272.      \ifeof\pst@mpin
  273.        \errhelp=\PShelp
  274.        \errmessage{(\PSfilename) is not an Encapsulated PostScript File:
  275.            I could not find any \B@undingBox: line.}%
  276.        \edef\v@lue{0 0 142 142:}%
  277.        \psloc@lerr{is not an EPSFile}%
  278.        \NotB@undingBoxfalse
  279.      \else
  280.        \expandafter\sc@nBBline\n@xtline:\@ndBBline
  281.        \ifx\p@rameter\B@undingBox\NotB@undingBoxfalse
  282.          \edef\t@mp{%
  283.            \expandafter\g@bblefirstblank\v@lue\space\space\space}%
  284.          \expandafter\s@tsize\t@mp\@ndsize
  285.        \else\NotB@undingBoxtrue
  286.        \fi
  287.      \fi
  288.    \ifNotB@undingBox\repeat
  289.    \closein\pst@mpin
  290.  \fi
  291. \message{#1}%
  292. }%
  293. %
  294. % \psboxto(xdim;ydim){psfilename}: you specify the dimensions and
  295. %    TeX uniformly scales to fit the largest one. If xdim=0pt, the
  296. %    scale is fully determined by ydim and vice versa.
  297. %    Notice: psboxes are a real vboxes; couldn't take hbox otherwise all
  298. %    indentation and all cr's would be interpreted as spaces (hugh!).
  299. %
  300. \def\psboxto(#1;#2)#3{\vbox{
  301.    \ReadPSize{#3}%
  302.    \divide\drawingwd by 1000
  303.    \divide\drawinght by 1000
  304.    \d@mx=#1
  305.    \ifdim\d@mx=0pt\xscale=1000
  306.          \else \xscale=\d@mx \divide \xscale by \drawingwd\fi
  307.    \d@my=#2
  308.    \ifdim\d@my=0pt\yscale=1000
  309.          \else \yscale=\d@my \divide \yscale by \drawinght\fi
  310.    \ifnum\yscale=1000
  311.          \else\ifnum\xscale=1000\xscale=\yscale
  312.                     \else\ifnum\yscale<\xscale\xscale=\yscale\fi
  313.               \fi
  314.    \fi
  315.    \divide\pswdincr by 1000 \multiply\pswdincr by \xscale
  316.    \divide\pshtincr by 1000 \multiply\pshtincr by \xscale
  317.    \divide\psxoffset by1000 \multiply\psxoffset by\xscale
  318.    \divide\psyoffset by1000 \multiply\psyoffset by\xscale
  319.    \global\divide\pscm by 1000
  320.    \global\multiply\pscm by\xscale
  321.    \multiply\drawingwd by\xscale \multiply\drawinght by\xscale
  322.    \ifdim\d@mx=0pt\d@mx=\drawingwd\fi
  323.    \ifdim\d@my=0pt\d@my=\drawinght\fi
  324.    \message{scaled \the\xscale}%
  325.  \hbox to\d@mx{\hss\vbox to\d@my{\vss
  326.    \global\setbox\drawingBox=\hbox to 0pt{\kern\psxoffset\vbox to 0pt{
  327.       \kern-\psyoffset
  328.       \PSspeci@l{\PSfilename}{\the\xscale}%
  329.       \vss}\hss\ps@nnotation}%
  330.    \advance\pswdincr by \drawingwd
  331.    \advance\pshtincr by \drawinght
  332.    \global\wd\drawingBox=\the\pswdincr
  333.    \global\ht\drawingBox=\the\pshtincr
  334.    \baselineskip=0pt
  335.    \copy\drawingBox
  336.  \vss}\hss}%
  337.   \global\psxoffset=0pt
  338.   \global\psyoffset=0pt
  339.   \global\pswdincr=0pt
  340.   \global\pshtincr=0pt % These are local to one figure
  341.   \global\pscm=1cm %should not be necessary
  342.   \global\drawingwd=\drawingwd
  343.   \global\drawinght=\drawinght
  344. }}%
  345. %
  346. % \psboxscaled{scalefactor*1000}{PSfilename} allows to bypass the
  347. %   rounding errors of TeX integer divisions for situations where the
  348. %   TeX box should fit the original BoundingBox with a precision better
  349. %   than 1/1000.
  350. %
  351. \def\psboxscaled#1#2{\vbox{
  352.   \ReadPSize{#2}%
  353.   \xscale=#1
  354.   \message{scaled \the\xscale}%
  355.   \advance\drawingwd by\pswdincr\advance\drawinght by\pshtincr
  356.   \divide\pswdincr by 1000 \multiply\pswdincr by \xscale
  357.   \divide\pshtincr by 1000 \multiply\pshtincr by \xscale
  358.   \divide\psxoffset by1000 \multiply\psxoffset by\xscale
  359.   \divide\psyoffset by1000 \multiply\psyoffset by\xscale
  360.   \divide\drawingwd by1000 \multiply\drawingwd by\xscale
  361.   \divide\drawinght by1000 \multiply\drawinght by\xscale
  362.   \global\divide\pscm by 1000
  363.   \global\multiply\pscm by\xscale
  364.   \global\setbox\drawingBox=\hbox to 0pt{\kern\psxoffset\vbox to 0pt{
  365.      \kern-\psyoffset
  366.      \PSspeci@l{\PSfilename}{\the\xscale}%
  367.      \vss}\hss\ps@nnotation}%
  368.   \advance\pswdincr by \drawingwd
  369.   \advance\pshtincr by \drawinght
  370.   \global\wd\drawingBox=\the\pswdincr
  371.   \global\ht\drawingBox=\the\pshtincr
  372.   \baselineskip=0pt
  373.   \copy\drawingBox
  374.   \global\psxoffset=0pt
  375.   \global\psyoffset=0pt
  376.   \global\pswdincr=0pt
  377.   \global\pshtincr=0pt % These are local to one figure
  378.   \global\pscm=1cm
  379.   \global\drawingwd=\drawingwd
  380.   \global\drawinght=\drawinght
  381. }}%
  382. %
  383. %  \psbox{PSfilename} makes a TeX box having the minimal size to
  384. %      enclose the picture
  385. \def\psbox#1{\psboxscaled{1000}{#1}}%
  386. %------------------------------------------------------
  387. %  \joinfiles file1, file2, ...n \into joinedfilename .
  388. %     makes one file out of many
  389. %  \splitfile joinedfilename
  390. %     the opposite
  391. \newif\ifn@teof\n@teoftrue
  392. \newif\ifc@ntrolline
  393. \newif\ifmatch
  394. \newread\j@insplitin
  395. \newwrite\j@insplitout
  396. \newwrite\psbj@inaux
  397. \immediate\openout\psbj@inaux=psbjoin.aux
  398. \immediate\write\psbj@inaux{\string\joinfiles}%
  399. \immediate\write\psbj@inaux{\jobname,}%
  400. %
  401. % INPUT REDEFINITION
  402. %
  403. % works if #1 is a single character
  404. \def\toother#1{\ifcat\relax#1\else\expandafter%
  405.   \toother@ux\meaning#1\endtoother@ux\fi}%
  406. \def\toother@ux#1 #2#3\endtoother@ux{\def\tmp{#3}%
  407.   \ifx\tmp\@mpty\def\tmp{#2}\let\next=\relax%
  408.   \else\def\next{\toother@ux#2#3\endtoother@ux}\fi%
  409. \next}%
  410. %
  411. % \readfilename defs:
  412. %
  413. \let\readfilenamehook=\relax
  414. \def\re@d{\expandafter\re@daux}% spares typing 10 \expandafter's...
  415. \def\re@daux{\futurelet\nextchar\stopre@dtest}%
  416. \def\re@dnext{\xdef\lastreadfilename{\lastreadfilename\nextchar}%
  417.   \afterassignment\re@d\let\nextchar}%
  418. \def\stopre@d{\egroup\readfilenamehook}%
  419. \def\stopre@dtest{%
  420.   \ifcat\nextchar\relax\let\nextread\stopre@d
  421.   \else
  422.     \ifcat\nextchar\space\def\nextread{%
  423.       \afterassignment\stopre@d\chardef\nextchar=`}%
  424.     \else\let\nextread=\re@dnext
  425.       \toother\nextchar
  426.       \edef\nextchar{\tmp}%
  427.     \fi
  428.   \fi\nextread}%
  429. \def\readfilename{\vbox\bgroup%
  430.   \let\\=\backslashother \let\%=\percentother \let\~=\tildeother
  431.   \let\#=\sharpother \xdef\lastreadfilename{}%
  432.   \re@d}%
  433. %
  434. % redefines \input using \readfilename
  435. %
  436. \xdef\GlobalInputList{\jobname}%
  437. \def\psnewinput{%
  438.   \def\readfilenamehook{% each entry in \GlobalInputList should be unique
  439.     \if\matchexpin{\GlobalInputList}{, \lastreadfilename}%
  440.     \else\xdef\GlobalInputList{\GlobalInputList, \lastreadfilename}%
  441.       \immediate\write\psbj@inaux{\lastreadfilename,}%
  442.     \fi%
  443.     \ps@ldinput\lastreadfilename\relax%
  444.     \let\readfilenamehook=\relax%
  445.   }\readfilename%
  446. }%
  447. \expandafter\ifx\csname @@input\endcsname\relax    % then Plain
  448.   \immediate\let\ps@ldinput=\input\def\input{\psnewinput}%
  449. \else
  450.   \immediate\let\ps@ldinput=\@@input
  451.   \def\@@input{\psnewinput}%
  452. \fi%
  453. %
  454. \def\nowarnopenout{%
  455.  \def\warnopenout##1##2{%
  456.    \readfilename##2\relax
  457.    \message{\lastreadfilename}%
  458.    \immediate\openout##1=\lastreadfilename\relax}}%
  459. \def\warnopenout#1#2{%
  460.  \readfilename#2\relax
  461.  \def\t@mp{TrashMe,psbjoin.aux,psbjoint.tex,}\uncatcode\t@mp
  462.  \if\matchexpin{\t@mp}{\lastreadfilename,}%
  463.  \else
  464.    \immediate\openin\pst@mpin=\lastreadfilename\relax
  465.    \ifeof\pst@mpin
  466.      \else
  467.      \errhelp{If the content of this file is so precious to you, abort (ie
  468. press x or e) and rename it before retrying.}%
  469.      \errmessage{I'm just about to replace your file named \lastreadfilename}%
  470.    \fi
  471.    \immediate\closein\pst@mpin
  472.  \fi
  473.  \message{\lastreadfilename}%
  474.  \immediate\openout#1=\lastreadfilename\relax}%
  475. % % will have an unusual catcode below; use * instead
  476. %\vbox
  477. {\catcode`\%=12\catcode`\*=14
  478. \gdef\splitfile#1{*
  479.  \readfilename#1\relax
  480.  \immediate\openin\j@insplitin=\lastreadfilename\relax
  481.  \ifeof\j@insplitin
  482.    \message{! I couldn't find and split \lastreadfilename!}*
  483.  \else
  484.    \immediate\openout\j@insplitout=TrashMe
  485.    \message{< Splitting \lastreadfilename\space into}*
  486.    \loop
  487.      \ifeof\j@insplitin
  488.        \immediate\closein\j@insplitin\n@teoffalse
  489.      \else
  490.        \n@teoftrue
  491.        \executeinspecs{\global\read\j@insplitin to\spl@tinline\expandafter
  492.          \ch@ckbeginnewfile\spl@tinline%Beginning-Of-File-Named:%\endcheck}*
  493.        \ifc@ntrolline
  494.        \else
  495.          \toks0=\expandafter{\spl@tinline}*
  496.          \immediate\write\j@insplitout{\the\toks0}*
  497.        \fi
  498.      \fi
  499.    \ifn@teof\repeat
  500.    \immediate\closeout\j@insplitout
  501.  \fi\message{>}*
  502. }*
  503. \gdef\ch@ckbeginnewfile#1%Beginning-Of-File-Named:#2%#3\endcheck{*
  504.  \def\t@mp{#1}*
  505.  \ifx\@mpty\t@mp
  506.    \def\t@mp{#3}*
  507.    \ifx\@mpty\t@mp
  508.      \global\c@ntrollinefalse
  509.    \else
  510.      \immediate\closeout\j@insplitout
  511.      \warnopenout\j@insplitout{#2}*
  512.      \global\c@ntrollinetrue
  513.    \fi
  514.  \else
  515.    \global\c@ntrollinefalse
  516.  \fi}*
  517. \gdef\joinfiles#1\into#2{*
  518.  \message{< Joining following files into}*
  519.  \warnopenout\j@insplitout{#2}*
  520.  \message{:}*
  521.  {*
  522.  \edef\w@##1{\immediate\write\j@insplitout{##1}}*
  523. \w@{% This collection of files was produced with CERN psbox package}*
  524. \w@{% To decompose and tex it:}*
  525. \w@{%-save this with a filename CONTAINING ONLY LETTERS and a .TEX}*
  526. \w@{% extension (say, JOINTFIL.TEX), in some uncrowded directory;}*
  527. \w@{%-make sure you can \string\input\space psbox.tex (version>=1.3);}*
  528. \w@{%  (else ftp cs.nyu.edu(=128.122.140.24):pub/TeX/psbox/, then get}*
  529. \w@{%  and tex the file psboxall.tex; more info in psbREAD.ME)}*
  530. \w@{%-tex JOINTFIL.TEX using Plain, or LaTeX, or whatever is needed by}*
  531. \w@{%  the first file in the joining (after splitting JOINTFIL.TEX into}*
  532. \w@{%  it's constituents, TeX will try to process it as it stands).}*
  533. \w@{\string\input\space psbox.tex}*
  534. \w@{\string\splitfile{\string\jobname}}*
  535. \w@{\string\let\string\autojoin=\string\relax}*
  536. }*
  537.  \expandafter\tre@tfilelist#1, \endtre@t
  538.  \immediate\closeout\j@insplitout
  539.  \message{>}*
  540. }*
  541. \gdef\tre@tfilelist#1, #2\endtre@t{*
  542.  \readfilename#1\relax
  543.  \ifx\@mpty\lastreadfilename
  544.  \else
  545.    \immediate\openin\j@insplitin=\lastreadfilename\relax
  546.    \ifeof\j@insplitin
  547.      \errmessage{I couldn't find file \lastreadfilename}*
  548.    \else
  549.      \message{\lastreadfilename}*
  550.      \immediate\write\j@insplitout{%Beginning-Of-File-Named:\lastreadfilename}*
  551.      \executeinspecs{\global\read\j@insplitin to\oldj@ininline}*
  552.      \loop
  553.        \ifeof\j@insplitin\immediate\closein\j@insplitin\n@teoffalse
  554.        \else\n@teoftrue
  555.          \executeinspecs{\global\read\j@insplitin to\j@ininline}*
  556.          \toks0=\expandafter{\oldj@ininline}*
  557.          \let\oldj@ininline=\j@ininline
  558.          \immediate\write\j@insplitout{\the\toks0}*
  559.        \fi
  560.      \ifn@teof
  561.      \repeat
  562.    \immediate\closein\j@insplitin
  563.    \fi
  564.    \tre@tfilelist#2, \endtre@t
  565.  \fi}*
  566. }%
  567. % To be put at the end of a file, for making a tar-like file containing
  568. %   everything it used.
  569. \def\autojoin{%
  570.  \immediate\write\psbj@inaux{\string\into{psbjoint.tex}}%
  571.  \immediate\closeout\psbj@inaux
  572.  \expandafter\joinfiles\GlobalInputList\into{psbjoint.tex}%
  573. }%
  574. %----------------------------------------------------------------
  575. %  Annotations & Captions etc...
  576. %
  577. %
  578. % \centinsert{anybox} is just a centered \midinsert, but is included as
  579. %    people barely use the original inserts from TeX.
  580. %
  581. \def\centinsert#1{\midinsert\line{\hss#1\hss}\endinsert}%
  582. \def\psannotate#1#2{\vbox{%
  583.   \def\ps@nnotation{#2\global\let\ps@nnotation=\relax}#1}}%
  584. \def\pscaption#1#2{\vbox{%
  585.    \setbox\drawingBox=#1
  586.    \copy\drawingBox
  587.    \vskip\baselineskip
  588.    \vbox{\hsize=\wd\drawingBox\setbox0=\hbox{#2}%
  589.      \ifdim\wd0>\hsize
  590.        \noindent\unhbox0\tolerance=5000
  591.     \else\centerline{\box0}%
  592.     \fi
  593. }}}%
  594. % for compatibility with older versions, but \psfig is a bad name!
  595. %\def\psfig#1#2#3{\pscaption{\psannotate{#1}{#2}}{#3}}
  596. %\def\psfigurebox#1#2#3{\pscaption{\psannotate{\psbox{#1}}{#2}}{#3}}
  597. %
  598. % \at(#1;#2)#3 puts #3 at #1-higher and #2-right of the current
  599. %    position without moving it (to be used in annotations).
  600. \def\at(#1;#2)#3{\setbox0=\hbox{#3}\ht0=0pt\dp0=0pt
  601.   \rlap{\kern#1\vbox to0pt{\kern-#2\box0\vss}}}%
  602. %
  603. % \gridfill(ht;wd) makes a 1cm*1cm grid of ht by wd whose lower-left
  604. %   corner is the current point
  605. \newdimen\gridht \newdimen\gridwd
  606. \def\gridfill(#1;#2){%
  607.   \setbox0=\hbox to 1\pscm
  608.   {\vrule height1\pscm width.4pt\leaders\hrule\hfill}%
  609.   \gridht=#1
  610.   \divide\gridht by \ht0
  611.   \multiply\gridht by \ht0
  612.   \gridwd=#2
  613.   \divide\gridwd by \wd0
  614.   \multiply\gridwd by \wd0
  615.   \advance \gridwd by \wd0
  616.   \vbox to \gridht{\leaders\hbox to\gridwd{\leaders\box0\hfill}\vfill}}%
  617. %
  618. % Useful to measure where to put annotations
  619. \def\fillinggrid{\at(0cm;0cm){\vbox{%
  620.   \gridfill(\drawinght;\drawingwd)}}}%
  621. %
  622. % \textleftof\anybox: Sample text\endtext
  623. %   inserts "Sample text" on the left of \anybox ie \vbox, \psbox.
  624. %   \textrightof is the symmetric (not documented, too uggly)
  625. % Welcome any suggestion about clean wraparound macros from
  626. %   TeXhackers reading this
  627. %
  628. \def\textleftof#1:{%
  629.   \setbox1=#1
  630.   \setbox0=\vbox\bgroup
  631.     \advance\hsize by -\wd1 \advance\hsize by -2em}%
  632. \def\textrightof#1:{%
  633.   \setbox0=#1
  634.   \setbox1=\vbox\bgroup
  635.     \advance\hsize by -\wd0 \advance\hsize by -2em}%
  636. \def\endtext{%
  637.   \egroup
  638.   \hbox to \hsize{\valign{\vfil##\vfil\cr%
  639. \box0\cr%
  640. \noalign{\hss}\box1\cr}}}%
  641. %
  642. % \frameit{\thick}{\skip}{\anybox}
  643. %    draws with thickness \thick a box around \anybox, leaving \skip of
  644. %    blank around it. eg \frameit{0.5pt}{1pt}{\hbox{hello}}
  645. % \boxit{\anybox} is a shortcut.
  646. \def\frameit#1#2#3{\hbox{\vrule width#1\vbox{%
  647.   \hrule height#1\vskip#2\hbox{\hskip#2\vbox{#3}\hskip#2}%
  648.         \vskip#2\hrule height#1}\vrule width#1}}%
  649. \def\boxit#1{\frameit{0.4pt}{0pt}{#1}}%
  650. %
  651. %
  652. \catcode`\@=12 % cs containing @ are unreachable
  653. %
  654. % CUSTOMIZE YOUR DEFAULT DRIVER:
  655. %    Uncomment the line corresponding to your TeX system:
  656. %\psfortextures%     For TeXtures on the Macintosh
  657. %\psforoztex   %     For OzTeX shareware on the Macintosh
  658. %\psfordvitops %     For the DVItoPS converter for TeX on IBM mainframes
  659.  \psfordvips   %     For DVIPS converter on VAX and UNIX
  660. %\psfordvitps  %     For dvitps from TeXPS package under UNIX
  661. %\psfordvialw  %     For dvialw, UNIX public domain
  662. %\psonlyboxes  %     Blank Boxes (when all else fails).
  663. %Beginning-Of-File-Named:TrashMe
  664. \splitfile{\jobname}%
  665. \let\autojoin=\relax
  666. %Beginning-Of-File-Named:psbsamp.tex
  667. % psbsamp.tex V-1.3: a sample use of the psbox macros from Plain TeX.
  668. %2345678 1 345678 2 345678 3 345678 4 345678 5 345678 6 345678 7 3456789
  669. %
  670. \input psbox.tex % 'told you it was necessary!
  671. %
  672. %
  673. % These are just to get a mini verbatim:
  674.   \def\\{\hbox{$\backslash$}}%
  675.   \edef\{{\hbox{$\{$}}%
  676.   \edef\}{\hbox{$\}$}}%
  677. \def\section#1{\ifnum\pageno=1\else\vfil\break\fi
  678.   \centerline{\frameit{1pt}{2pt}{\frameit{0.5pt}{3pt}{\hbox{#1}}}}%
  679.   \nobreak\medskip}%
  680. \def\LaTeX{{\rm L\kern-.36em\raise.3ex\hbox{a}\kern-.15em
  681.     T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}%
  682. %
  683. %
  684. \line{\hfil
  685. \frameit{1pt}{2pt}{\frameit{0.5pt}{3pt}{\hbox{PS}}}
  686. \frameit{1pt}{2pt}{\frameit{0.5pt}{3pt}{\hbox{BOX}}}
  687. \hfil \llap{V-\psboxversion, by Jean Orloff}}
  688. \line{\sevenrm e-mail: ORLOFF @ SURYA11.CERN.CH\hfil
  689. Updates available by anonymous ftp from:
  690. cs.nyu.edu:pub/tex/psbox/%;\hfil noa.huji.ac.il
  691. }
  692. \bigbreak
  693. \section{Crash Overview}
  694. {\def\nl{\hfil\break}\parindent=0pt\parskip=3ptplus3pt\def\im{\parindent=1cm}
  695. WHAT IS IT:\nl
  696. psbox is a set of machine-independent TeX macros to:
  697. {\im
  698. \item{1)\ }allow (Encapsulated) PostScript figure inclusion in all versions
  699.    of TeX (Plain, LaTeX) on all machines using a PostScript printer
  700.  
  701. \item{2)\ }facilitate the communication (e-mail, ftp, ...) of all the files
  702.    (text, macros, figs) needed to reproduce a TeX document by grouping
  703.    them together into a single, TeXable file.
  704.  
  705. \bigskip
  706. \noindent HOW TO GET IT TO WORK:
  707. \item{1)\ }get the file psboxall.tex by one of the following ways:\nl
  708.    -from outside CERN: ftp cs.nyu.edu(=128.122.140.24):pub/tex/psbox/\nl
  709.    -(if all else fails) send me a mail (orloff@surya11.cern.ch);
  710. \item{2)\ }tex psboxall.tex: this will produce a complete documentation
  711. dvi and a
  712.    set of files, including the raw macros named psbox.tex;
  713. \item{3)\ }adapt your psbox.tex to your system by uncommenting the appropriate
  714.    {\tt\%\\psfor...}-line at the end of the file;
  715. \item{4)\ }put it in your TeX Inputs directory
  716. }
  717.  
  718. \bigskip
  719. MAJOR COMMANDS:
  720.  
  721. \def\tag#1{\noindent\hbox{\tt #1\hss}\nl\hangindent1cm}
  722. \tag{\\psbox\{fname.eps\}}
  723.    makes a box having the right size to enclose the figure fname.eps;
  724.  
  725. \tag{\\psboxto(xdim;ydim)\{fn.eps\}}
  726.    makes a box of the given size and rescales fn.eps so that it just fits;
  727.  
  728. \tag{\\psboxto(\\hsize;0pt)\{fn.eps\}}
  729.    has the maximal width \& a height computed from a uniformal rescaling;
  730.  
  731. \tag{\\centinsert\{\\pscaption\{\\psbox\{fn.eps\}\}\{Fig 1: the
  732. caption...\}\}}
  733.    recommended way to include a graphics between 2 paragraphs;
  734.  
  735. \tag{\\begin\{figure\}[hbt]\\begin\{center\}\\mbox\{\\psbox\{fn.eps\}\}\\caption\{Fig
  736. 1:\} \\end\{figure\}}
  737.    recommended way in LaTeX;
  738.  
  739. \tag{\\autojoin}
  740.    makes a single file called psbjoint.tex containing the currently tex'd
  741.    file plus all the files (macros \& figs) included since the \\input of
  742.    psbox.tex. Texing psbjoint.tex will split it into all these files with
  743.    their original names (so think of PC's:12345678.123!!) and tex the
  744.    first one (generally the one that issued \\autojoin).
  745.  
  746. }
  747. \vfill\break
  748. \section{Introduction}
  749. \TeX{} and PostScript have become de-facto standards for
  750. producing scientific papers and figures. The reason for this perhaps
  751. lies in the success of electronic mail within the scientific
  752. community as both standards produce text files that easily propagate by
  753. e-mail and yet produce machine-independent result when printed from any
  754. computer on any PostScript printer\footnote{*}{You might think of
  755. sending directly the PostScript description of the whole document, but
  756. this would mean sending 15 times more caracters and moreover
  757. forbidding your correspondant to make any correction to the
  758. manuscript.}. Recently, these standards have been further sanctified in
  759. the Physics community with the advent of electronic ``Bulletin Boards"
  760. which spread like crazy and whose very existence precisely relies on
  761. such standards.
  762.  
  763. In this rapidly evolving and modernish landscape, the
  764. inclusion of figures into papers still remains a dark spot: it is
  765. relatively uneasy and, worse, essentially non-universal. The purpose of the
  766. {\tt psbox} macros is to try and correct for this.
  767.  
  768. To start with, let us show how to use the macros for including
  769. Encapsulated PostScript graphics-File (EPSF) into any \TeX\ document
  770. (Plain \TeX, Plain-based macros like Harvmac, Phyzzx,... or \LaTeX).
  771. To get this to work, you first need to produce an EPSF. This
  772. is different from a usual PostScript file. (For instance, with CERN's
  773. package PAW/HIGZ, the output device specified in the metafile is -111
  774. for simple postscript and -113 for EPSF). You can always check whether
  775. you succeeded by looking at your EPSF: it should start with {\tt\%!}
  776. and somewhere contain a line like:
  777. $$
  778. \hbox{\tt\%\%BoundingBox: llx lly urx ury\hfil}
  779. $$
  780. where llx \& lly (urx \& ury) are the positive integer coordinates of
  781. the lower-left (upper-right) corners of the smallest rectangle enclosing
  782. your graphics. If all else fails, you still have the opportunity of
  783. adding such a line by hand: you might then want to know that
  784. coordinates are given in ``Big Points'' (1in=72bp)%
  785. \footnote{**}{%
  786. Not to be confused with ``Points'' (1in=72.27pt): inventing units
  787. related by such crazy factors as 72.27/72 definitely is a perverse and
  788. deeply immoral sport!}
  789. from the bottom left
  790. corner of the printed page. You can always visualize the corresponding
  791. {\tt\%\%BoundingBox} using {\tt\\boxit} (see below). Once you have a
  792. good EPSF, you should save it in the same directory as the \TeX{}
  793. file in which you want to insert your graphics.
  794.  
  795. Now you're ready for inserting. Here is how to do:
  796. \item{1)} Check you have a copy of the file {\tt psbox.tex} somewhere on
  797.   your system. If you don't, get it by ``anonymous ftp'' from the site
  798.   {\tt cs.nyu.edu}. In the directory pub/tex/psbox, you will find a file
  799.   called {\tt psboxall.tex} which is an ``archive'' containing the macros,
  800.   this documentation, a sample PostScript figure, etc... Just ``{\tt get}''
  801.   it by ftp, tex it on your system, and you will see how an archive splits
  802.   into it's original files.
  803. \item{2)} make sure the uncommented line at the end of the {\tt psbox.tex}
  804.   file corresponds to your particular way of translating \TeX{}
  805.   output into PostScript:
  806. $$\vbox{\halign{\tt\\ps#\hfil&\qquad#\hfil\cr
  807. fortextures& for TeXtures on the Macintosh\cr
  808. foroztex&    for OzTeX shareware soft on the Macintosh\cr
  809. fordvitops&  for IBM mainframes dvi to postscript converter DVITOPS\cr
  810. fordvips&    for Unix, PC and VAX dvi to postscript converter DVIPS\cr
  811. %fordvitps&   for dvitps from the TeXPS package under UNIX.\cr
  812. fordvialw&   for Unix free converter (part GNU software)\cr
  813. onlyboxes&   for poor people without any of these\cr
  814. }}
  815. $$
  816. \item{3)} in the
  817.   beginning of your \TeX{} file, type {\tt\\input psbox.tex}
  818.   in order to load the relevant \TeX{} macros;
  819.  
  820.  
  821. If you get the wrong postscript
  822. converter, you will just get extremely white(!) figures but the
  823. formatting of your text will be exactly the same.
  824. Now you can get your graphics where you want in the text by
  825. just typing:
  826. $$
  827. \hbox{\tt\$\$\\psbox\{box.ps\}\$\$}
  828. $$
  829. And this is what you get:
  830. $$
  831. \psbox{box.ps}
  832. $$
  833. The {\tt\\psbox\{EPSFilename\}} macro makes a \TeX{} \\vbox
  834. having the right size to contain the graphics and issues a \\special
  835. command for the postscript printer to put the EPSF graphics at the
  836. right place.
  837.  
  838. \section{Scalings}
  839. You can moreover use Postscript to resize your graphics. This can be
  840. done via the {\tt\\psboxto} macro: here you
  841. specify the dimensions and \TeX{} uniformly scales the graphics to fit
  842. entirely in the given box. For instance
  843. $$\eqalign{\hbox{\tt\$\$}
  844. &\hbox{\tt\\boxit\{\\psboxto(3cm;7cm)\{box.ps\}\}}\cr
  845. &\hbox{\tt\\boxit\{\\psboxto(7cm;3cm)\{box.ps\}\}\$\$}\cr}
  846. $$
  847. gives
  848. $$
  849. \boxit{\psboxto(3cm;7cm){box.ps}}
  850. \boxit{\psboxto(7cm;3cm){box.ps}}
  851. $$
  852. (we have here materialized the \TeX boxes by the
  853. {\tt\\boxit\{anybox\}} command which can be useful for
  854. boxing not only psboxes, but any kind of text boxes. To
  855. control the thickness of the line and to have some white space
  856. between your box and it's framing, you can use
  857. {\tt\\frameit\{LineThickness\} \{WhiteSpaceThickness\} \{\\anybox\}}).
  858.  
  859. If you specify one zero dimension in {\tt\\psboxto}, you get a box
  860. proportional to the natural one for your drawing, but with the scale
  861. specified by the non-zero dimension: $$\eqalign{\hbox{\tt\$\$}
  862. &\hbox{\tt\\boxit\{\\psboxto(3cm;0cm)\{box.ps\}\}}\cr
  863. &\hbox{\tt\\boxit\{\\psboxto(0cm;3cm)\{box.ps\}\}\$\$}\cr} $$ yields
  864. $$ \boxit{\psboxto(3cm;0cm){box.ps}} \boxit{\psboxto(0cm;3cm){box.ps}}
  865. $$
  866. Altenatively, you can specify a scale factor%
  867. \footnote{*}{This way
  868. you can be sure to get exactly the same size for the \TeX{} and EPSF
  869. box: with {\tt\\psboxto}, you can have the \TeX box 1/1000 too large
  870. because of rounding errors unavoidable for compatibility reasons}
  871. ($\times1000$ in the usual \TeX{} way):
  872. $$\hbox{\tt\\psboxscaled\{250\}\{box.ps\}:}\psboxscaled{250}{box.ps}
  873. $$
  874. On certain occasions, the way PostScript computes it's BoundingBox may
  875. may be too conservative: the box turns out to be too large because of
  876. some invisible control point lying outside the visual bounding box.
  877. For most purposes, this won't harm. Certain perfectionists will
  878. nevertheless appreciate the possibility of correcting the bounding
  879. box by specifying an offset ({\tt\\psxoffset, \\psyoffset}) 
  880. for the lower left corner and incrementing the width and height
  881. ({\tt\\pswdincr, \\pshtincr}) of the graphics. For instance,
  882. $$\hbox{\tt\\psxoffset=0.3cm\\psyoffset=12pt\\pswdincr=0.3cm\\pshtincr=12pt}
  883. $$
  884. will {\bf raise} the figure by 12pt, shift it to the right by
  885. 0.3cm and change it's size so that it still fits. These dimensions
  886. get reset after each use of {\tt\\psbox...} so
  887. you should type this just before the one you want to modify. These
  888. dimensions also get scaled together with the figure if you later decide to
  889. use {\tt\\psboxto or \\psboxscaled}:
  890. $$
  891. \psxoffset=0.3cm\psyoffset=12pt
  892. \pswdincr=0.3cm\pshtincr=12pt
  893. \boxit{\psboxto(3cm;0cm){box.ps}}\kern2cm
  894. \psxoffset=0.3cm\psyoffset=12pt
  895. \pswdincr=0.3cm\pshtincr=12pt
  896. \boxit{\psboxto(1cm;0cm){box.ps}}
  897. $$
  898. Since a {\tt\\psbox} is a true \TeX box, nothing prevents you to have
  899. \psboxto(0cm;1em){box.ps} it in the middle of a line..(?) More
  900. seriously, if you want your graphics to be as large as possible, you
  901. can type
  902. $$\hbox{\tt\$\$\\psboxto(\\hsize;0cm)\{box.ps\}\$\$}
  903. $$
  904. which gives
  905. $$\psboxto(\hsize;0cm){box.ps}
  906. $$
  907.  
  908. \section{Annotations}
  909. For certain figures, you might want to add something on top of the
  910. graphics (eg. a greek letter to name an axis, or other math symbols
  911. you use in the text). This is what
  912. {\tt\\psannotate\{\\psbox...\}\{annotation\}} was made for. For
  913. instance if you type
  914. $$\hbox{\tt\$\$%
  915. \\psannotate\{\\psboxto(10cm;3cm)\{box.ps\}\}%
  916. \{\\fillinggrid\\at(3\\pscm;1\\pscm)\{A sample at.\}\}\$\$}
  917. $$
  918. you get
  919. $$\psannotate{\psboxto(10cm;3cm){box.ps}} {\fillinggrid
  920. \at(3\pscm;1\pscm){A sample at.}}
  921. $$
  922. This example displays the 2 possible annotations:
  923. \item{-}{\tt\\at((xdim;ydim)\{annotation text\}} will place {\tt
  924. annotation text} xdim to the right of, and ydim higher than the
  925. current point without actually moving it (this may prove useful in
  926. other circumstances). The dimensions may be expressed in any valid
  927. \TeX{} unit, but here we used {\tt\\pscm} meaning scaled centimeters
  928. in order for the annotation to keep the same relative position inside
  929. the figure, whatever rescaling you might do later on.
  930.  
  931. \item{-}{\tt\\fillinggrid}: in order to help you in the tedious task
  932. of determining the position of your annotations, you can use
  933. {\tt\\fillinggrid} as one particular annotation. This will produce a
  934. 1\\pscm by 1\\pscm grid that roughly fills your figure. You will of
  935. course have to delete these in your final document\footnote{*} {To
  936. suppress all these grids at once in your final document, you may type
  937. {\tt\\let\\fillinggrid=\\relax} just after the line where you
  938. {\tt\\input psbox.tex}.}.
  939.  
  940. \section{Figure Environment For Plain\TeX}
  941. If you have many large figures, the probability that \TeX{}
  942. barks at you about ``overfull or underfull vbox...'' becomes
  943. significant, because you give it a hard time trying to cut pages
  944. into a document that has many large unbreakable units. To
  945. overcome this problem, La\TeX{} users simply have to type:\hfil\break
  946. {\tt\\begin\{figure\}[hbt]\hfil\break
  947. \\begin\{center\}\\mbox\{\\psbox...\}\\end\{center\}\hfil\break
  948. \\caption\{Some caption\}\hfil\break \\end\{figure\}\hfil\break}
  949. In Plain\TeX{} you should use
  950. {\tt\\centinsert\{\\psbox...\}} instead of {\tt\$\$\\psbox...\$\$}.
  951. This will get your graphics precisely where you typed it except if
  952. there is not enough room in the current page, in which case you'll get
  953. it on top of the next one.
  954.  
  955. However, you will then probably want to have a caption, in case your
  956. graphics and explanatory text get separated. You should then
  957. use {\tt\\pscaption\{\\psbox...\}\{caption\}}, for instance
  958. $$\vbox{\hsize=10cm\tt\hbox{
  959. \\centinsert\{
  960.   \\pscaption\{
  961.     \\psannotate\{
  962.       \\psboxto(6cm;0cm)\{box.ps\}\}\{
  963. }
  964. \hbox{\qquad\\fillinggrid\\at(3\\pscm;1\\pscm)\{A sample at.\}\}\}\{
  965.     Figure 1: this is ...
  966. \}\}
  967. }}
  968. $$
  969. in order to get:
  970. \centinsert{
  971.   \pscaption{
  972.     \psannotate{
  973.       \psboxto(6cm;0cm){box.ps}}{
  974.       \fillinggrid\at(3\pscm;1\pscm){A sample at.}}}{
  975.     Figure 1: this is probably the most stupid caption I can think of
  976.     but it can still be useful for illustrative purposes.
  977. }}
  978. %
  979. If your caption is short, it will automatically get centered:
  980. $$\pscaption{\psbox{box.ps}}{\bf Figure 327.}
  981. $$
  982.  
  983. \section{Multiple Files Management}
  984. Suppose you now have a few figures together with a paper, plus your favorite 
  985. macros and reference files. You want to communicate the fruits of your hard
  986. work to the entire world, but you don't want to send ten separate files to
  987. each collaborator/potentially interested scientist. So you create a "master"
  988. file containing (you hope) all the files needed to re\TeX{} your paper. The
  989. receiver will also have to do some electronic cutting and pasting. Very
  990. quickly, it starts being a nuisance for everybody to assemble and disassemble
  991. a large file into it's constituents. This is why I thought the following
  992. macros might prove handy:
  993.  
  994. \item{a.}{\tt\\joinfiles filename1, filename2, ..., filenamen \\into%
  995. \{JOINTFIL.TEX\}}\hfil\break
  996. joins several files into a big one that can be split later on. Since
  997. the goal here is universality, you should remember that PC's still form
  998. the majority of personal computers, and they like filenames of the form
  999. 12345678.123 where you can only replace digits by a letter (no
  1000. *,\&,\$,', etc...), without distinction between upper-case and
  1001. lower-case. So, if you want portability, save your texts as 
  1002. {\tt12345678.tex} and your figures as {\tt12345678.eps} (ie. no
  1003. empty extensions): this will save you from later troubles!
  1004. The file {\tt JOINTFIL.TEX} has a header explaining how to split
  1005. it (see below) and is in fact auto-splittable. Namely, you just have to
  1006. run \TeX, or \LaTeX{} depending of what is required by the first file in
  1007. the list. This should first split the file and then tex it while
  1008. including properly the figures. You can edit the ``archive'' {\tt
  1009. JOINTFIL.TEX}, for instance to change the header, or to modify the names
  1010. under which files will be stored when split. For this you may need to
  1011. know that each file in the archive has a header line containing it's
  1012. name, eg:\hfil\break
  1013. {\tt\%Beginning-Of-File-Named:box.ps}.
  1014.  
  1015. \item{b.} {\tt\\autojoin}:\hfil\break
  1016. since it is painful to remember the list of all figure's names, you can
  1017. generate a joint file called {\tt psbjoint.tex} by simply typing
  1018. {\tt\\autojoin} close to the end (ie. after all {\tt\\psbox...} and
  1019. {\tt\\input ...} have been issued) of the file you want to tex. This
  1020. will first close and then read in a file called {\tt psbjoin.aux} that is
  1021. always generated automatically and that basically contains the list of
  1022. all your inclusions (both figures and macro files {\tt\\input}ted). If
  1023. you never say {\tt\\autojoin}, the file {\tt psbjoin.aux} will
  1024. nevertheless be created and will by the end of the day contain the list
  1025. of files needed for your texing session. This list will appear as an
  1026. incomplete {\tt\\joinfiles}-command, which you can complete and tex to
  1027. do the joining. Notice: all these macro and figure files do not need to
  1028. be in the same directory to be found. If \TeX{} is able to find them
  1029. for {\tt\\input} or {\tt\\psbox} (because they are in some directory
  1030. named {\tt TeX Inputs} or pointed at by an environment variable {\tt
  1031. TEXINPUTS}), it will be able to join them too. Unix users should resist
  1032. the temptation of specifying explicit path in filenames (eg: {\tt
  1033. ../../TeX/mymacros.tex}): this makes their \TeX{} files non-portable.
  1034. They should rather add an entry in their {\tt TEXINPUTS} list of paths.
  1035.  
  1036. \item{c.}{\tt\\splitfile\{JOINTFIL.TEX\}}\hfil\break
  1037. splits {\tt JOINTFIL.TEX} into it's constituents. Anything before the
  1038. first {\tt\%Beginning-Of-File-Named:} line is trashed into a special
  1039. file called {\tt TrashMe}: never store precious info in such a file
  1040. anyhow!  You may fear what happens if one of the constituent-file
  1041. names coincides with a previoulsy existing file on your disk. Does it
  1042. silently replace it? Well, no, relax, all output produced by these
  1043. macros use {\tt\\warnopenout} instead of the standard {\tt\\openout},
  1044. which will give you a chance to break precisely in this case. Notice 
  1045. {\tt\\warnopenout} is sometimes too cautious: it can warn you before 
  1046. erasing a file that doesn't exist! This is because a file with the same
  1047. name exists in some directory \TeX{} is searching in for input files,
  1048. but relax, it will only write files in the same directory as {\tt
  1049. JOINTFIL.TEX}. Finally,
  1050. notice you can say {\tt\\splitfile \{\\jobname\}} in which case you will
  1051. split the very file that issued such a command (this is in fact what
  1052. makes the output of {\tt\\joinfiles} auto-splittable). However,
  1053. watchout: {\tt\\jobname} has peculiar and machine-dependent
  1054. definition. It gives the name of the file currently texed MINUS it's
  1055. {\tt.tex} extension if it has one (and on most machines, minus any
  1056. extension your filename could have). So, \TeX{} will not
  1057. be able to read in from the file named {\tt\\jobname} (without
  1058. extension). But it always tries to read in {\tt\\jobname.tex} (in fact,
  1059. on IBM \& VAX machines, it doesn't even try to read {\tt\\jobname}
  1060. without extension). This mess explains the
  1061. precaution taken in the header of a joint file, reproduced below:
  1062. {\obeylines\tt\def
  1063. {\hfil\break}
  1064. \% This collection of files was produced with CERN psbox package
  1065. \% To decompose and tex it:
  1066. \%-save this with a filename CONTAINING ONLY LETTERS and a .TEX
  1067. \% extension (say, JOINTFIL.TEX), in some uncrowded directory;
  1068. \%-make sure you can \string\input\space psbox.tex (version>=1.3);
  1069. \%  (else ftp cs.nyu.edu(=128.122.140.24):pub/TeX/psbox/, then get
  1070. \%  and tex the file psboxall.tex; more info in psbREAD.ME)
  1071. \%-tex JOINTFIL.TEX using Plain, or LaTeX, or whatever is needed by
  1072. \%  the first file in the joining (after splitting JOINTFIL.TEX into
  1073. \%  it's constituents, TeX will try to process it as it stands).
  1074. \\input psbox.tex
  1075. \\splitfile\{\\jobname\}
  1076. \\let\\autojoin\\=\\relax
  1077. }
  1078. \joinfiles psbREAD.ME, psboxOK.tex\into{TrashMe}
  1079. \section{Errors}
  1080. \message{RELAX!!!
  1081. The following error messages should not frighten you, they are
  1082. intentional tests. Just continue and see what comes out!}
  1083. If \TeX{} cannot find the file you specified, you will get the following
  1084. output:
  1085. $$\psbox{in_exist.ps}$$
  1086. On the other hand, an existing file which is not EPSF will produce:
  1087. $$\psbox{psbsamp.tex}$$
  1088. \autojoin
  1089. \bye
  1090. %Beginning-Of-File-Named:box.ps
  1091. %!PS-Adobe-2.0 EPSF-1.2
  1092. %%Creator:Adobe Illustrator(TM) 3.0
  1093. %%For: (pascal) (ducul)
  1094. %%Title: (box.ps)
  1095. %%CreationDate: (8/5/92) (18:13)
  1096. %%DocumentProcessColors: Black
  1097. %%DocumentFonts: Helvetica-Oblique
  1098. %%+ Times-Roman
  1099. %%DocumentProcSets: Adobe_Illustrator_1.1 0 0
  1100. %%DocumentSuppliedProcSets: Adobe_Illustrator_1.1 0 0
  1101. %%BoundingBox:84 365 299 484
  1102. %%ColorUsage: Black&White
  1103. %%TemplateBox:288 360 288 360
  1104. %%TileBox: 0 0 538 781
  1105. %%DocumentPreview: Macintosh_Pic
  1106. %%EndComments
  1107. %%BeginProcSet:Adobe_Illustrator_1.1 0 0
  1108. % Copyright (C) 1987-1990 Adobe Systems Incorporated.
  1109. % All Rights Reserved.
  1110. % Adobe Illustrator is a trademark of Adobe Systems Incorporated.
  1111. /Adobe_Illustrator_1.1 dup 100 dict def load begin
  1112. /Version 0 def
  1113. /Revision 0 def
  1114. % definition operators
  1115. /bdef {bind def} bind def
  1116. /ldef {load def} bdef
  1117. /xdef {exch def} bdef
  1118. % graphic state operators
  1119. /_K {3 index add neg dup 0 lt {pop 0} if 3 1 roll} bdef
  1120. /_k /setcmybcolor where
  1121. {/setcmybcolor get} {{1 sub 4 1 roll _K _K _K setrgbcolor pop} bind} ifelse def
  1122. /g {/_b xdef /p {_b setgray} def} bdef
  1123. /G {/_B xdef /P {_B setgray} def} bdef
  1124. /k {/_b xdef /_y xdef /_m xdef /_c xdef /p {_c _m _y _b _k} def} bdef
  1125. /K {/_B xdef /_Y xdef /_M xdef /_C xdef /P {_C _M _Y _B _k} def} bdef
  1126. /d /setdash ldef
  1127. /_i currentflat def
  1128. /i {dup 0 eq {pop _i} if setflat} bdef
  1129. /j /setlinejoin ldef
  1130. /J /setlinecap ldef
  1131. /M /setmiterlimit ldef
  1132. /w /setlinewidth ldef
  1133. % path construction operators
  1134. /_R {.25 sub round .25 add} bdef
  1135. /_r {transform _R exch _R exch itransform} bdef
  1136. /c {_r curveto} bdef
  1137. /C /c ldef
  1138. /v {currentpoint 6 2 roll _r curveto} bdef
  1139. /V /v ldef
  1140. /y {_r 2 copy curveto} bdef
  1141. /Y /y ldef
  1142. /l {_r lineto} bdef
  1143. /L /l ldef
  1144. /m {_r moveto} bdef
  1145. % error operators
  1146. /_e [] def
  1147. /_E {_e length 0 ne {gsave 0 g 0 G 0 i 0 J 0 j 1 w 10 M [] 0 d
  1148. /Courier 20 0 0 1 z [0.966 0.259 -0.259 0.966
  1149. _e 0 get _e 2 get add 2 div _e 1 get _e 3 get add 2 div] e _f t T grestore} if} bdef
  1150. /_fill {{fill} stopped
  1151. {/_e [pathbbox] def /_f (ERROR: can't fill, increase flatness) def n _E} if} bdef
  1152. /_stroke {{stroke} stopped
  1153. {/_e [pathbbox] def /_f (ERROR: can't stroke, increase flatness) def n _E} if} bdef
  1154. % path painting operators
  1155. /n /newpath ldef
  1156. /N /n ldef
  1157. /F {p _fill} bdef
  1158. /f {closepath F} bdef
  1159. /S {P _stroke} bdef
  1160. /s {closepath S} bdef
  1161. /B {gsave F grestore S} bdef
  1162. /b {closepath B} bdef
  1163. % text block construction and painting operators
  1164. /_s /ashow ldef
  1165. /_S {(?) exch {2 copy 0 exch put pop dup false charpath currentpoint _g setmatrix
  1166. _stroke _G setmatrix moveto 3 copy pop rmoveto} forall pop pop pop n} bdef
  1167. /_A {_a moveto _t exch 0 exch} bdef
  1168. /_L {0 _l neg translate _G currentmatrix pop} bdef
  1169. /_w {dup stringwidth exch 3 -1 roll length 1 sub _t mul add exch} bdef
  1170. /_z [{0 0} bind {dup _w exch neg 2 div exch neg 2 div} bind {dup _w exch neg exch neg} bind] def
  1171. /z {_z exch get /_a xdef /_t xdef /_l xdef exch findfont exch scalefont setfont} bdef
  1172. /_g matrix def
  1173. /_G matrix def
  1174. /_D {_g currentmatrix pop gsave concat _G currentmatrix pop} bdef
  1175. /e {_D p /t {_A _s _L} def} bdef
  1176. /r {_D P /t {_A _S _L} def} bdef
  1177. /a {_D /t {dup p _A _s P _A _S _L} def} bdef
  1178. /o {_D /t {pop _L} def} bdef
  1179. /T {grestore} bdef
  1180. % group construction operators
  1181. /u {} bdef
  1182. /U {} bdef
  1183. % font construction operators
  1184. /Z {findfont begin currentdict dup length dict begin
  1185. {1 index /FID ne {def} {pop pop} ifelse} forall /FontName exch def dup length 0 ne
  1186. {/Encoding Encoding 256 array copy def 0 exch {dup type /nametype eq
  1187. {Encoding 2 index 2 index put pop 1 add} {exch pop} ifelse} forall} if pop
  1188. currentdict dup end end /FontName get exch definefont pop} bdef
  1189. end
  1190. %%EndProcSet
  1191. %%EndProlog
  1192. %%BeginSetup
  1193. Adobe_Illustrator_1.1 begin
  1194. n
  1195. %%BeginEncoding: _Helvetica-Oblique Helvetica-Oblique
  1196. [39/quotesingle 96/grave 128/Adieresis/Aring/Ccedilla/Eacute/Ntilde/Odieresis
  1197. /Udieresis/aacute/agrave/acircumflex/adieresis/atilde/aring/ccedilla/eacute
  1198. /egrave/ecircumflex/edieresis/iacute/igrave/icircumflex/idieresis/ntilde
  1199. /oacute/ograve/ocircumflex/odieresis/otilde/uacute/ugrave/ucircumflex
  1200. /udieresis/dagger/degree/cent/sterling/section/bullet/paragraph/germandbls
  1201. /registered/copyright/trademark/acute/dieresis/.notdef/AE/Oslash
  1202. /.notdef/plusminus/.notdef/.notdef/yen/mu/.notdef/.notdef
  1203. /.notdef/.notdef/.notdef/ordfeminine/ordmasculine/.notdef/ae/oslash
  1204. /questiondown/exclamdown/logicalnot/.notdef/florin/.notdef/.notdef
  1205. /guillemotleft/guillemotright/ellipsis/.notdef/Agrave/Atilde/Otilde/OE/oe
  1206. /endash/emdash/quotedblleft/quotedblright/quoteleft/quoteright/divide
  1207. /.notdef/ydieresis/Ydieresis/fraction/currency/guilsinglleft/guilsinglright
  1208. /fi/fl/daggerdbl/periodcentered/quotesinglbase/quotedblbase/perthousand
  1209. /Acircumflex/Ecircumflex/Aacute/Edieresis/Egrave/Iacute/Icircumflex
  1210. /Idieresis/Igrave/Oacute/Ocircumflex/.notdef/Ograve/Uacute/Ucircumflex
  1211. /Ugrave/dotlessi/circumflex/tilde/macron/breve/dotaccent/ring/cedilla
  1212. /hungarumlaut/ogonek/caron
  1213. ]/_Helvetica-Oblique/Helvetica-Oblique Z
  1214. %%EndEncoding
  1215. %%BeginEncoding: _Times-Roman Times-Roman
  1216. [39/quotesingle 96/grave 128/Adieresis/Aring/Ccedilla/Eacute/Ntilde/Odieresis
  1217. /Udieresis/aacute/agrave/acircumflex/adieresis/atilde/aring/ccedilla/eacute
  1218. /egrave/ecircumflex/edieresis/iacute/igrave/icircumflex/idieresis/ntilde
  1219. /oacute/ograve/ocircumflex/odieresis/otilde/uacute/ugrave/ucircumflex
  1220. /udieresis/dagger/degree/cent/sterling/section/bullet/paragraph/germandbls
  1221. /registered/copyright/trademark/acute/dieresis/.notdef/AE/Oslash
  1222. /.notdef/plusminus/.notdef/.notdef/yen/mu/.notdef/.notdef
  1223. /.notdef/.notdef/.notdef/ordfeminine/ordmasculine/.notdef/ae/oslash
  1224. /questiondown/exclamdown/logicalnot/.notdef/florin/.notdef/.notdef
  1225. /guillemotleft/guillemotright/ellipsis/.notdef/Agrave/Atilde/Otilde/OE/oe
  1226. /endash/emdash/quotedblleft/quotedblright/quoteleft/quoteright/divide
  1227. /.notdef/ydieresis/Ydieresis/fraction/currency/guilsinglleft/guilsinglright
  1228. /fi/fl/daggerdbl/periodcentered/quotesinglbase/quotedblbase/perthousand
  1229. /Acircumflex/Ecircumflex/Aacute/Edieresis/Egrave/Iacute/Icircumflex
  1230. /Idieresis/Igrave/Oacute/Ocircumflex/.notdef/Ograve/Uacute/Ucircumflex
  1231. /Ugrave/dotlessi/circumflex/tilde/macron/breve/dotaccent/ring/cedilla
  1232. /hungarumlaut/ogonek/caron
  1233. ]/_Times-Roman/Times-Roman Z
  1234. %%EndEncoding
  1235. %%EndSetup
  1236. u
  1237. 0.5 g
  1238. 0 G
  1239. 0 i 0 J 1 j 1 w 4 M [3 2 ]0 d
  1240. %%Note:
  1241. 297 366 m
  1242. 297 483 L
  1243. 86 483 L
  1244. 86 366 L
  1245. 297 366 L
  1246. b
  1247. 191.5 424.5 m
  1248. B
  1249. U
  1250. u
  1251. 1 g
  1252. 0 j 0.3 w []0 d
  1253. 191.5 365.9999 m
  1254. 249.7652 365.9999 297.0001 392.1918 297.0001 424.5 c
  1255. 297.0001 456.8082 249.7652 483.0001 191.5 483.0001 c
  1256. 133.2347 483.0001 85.9999 456.8082 85.9999 424.5 c
  1257. 85.9999 392.1918 133.2347 365.9999 191.5 365.9999 c
  1258. b
  1259. 191.5 424.5 m
  1260. B
  1261. U
  1262. u
  1263. u
  1264. u
  1265. 0 g
  1266. 1 w
  1267. /_Helvetica-Oblique 10 12 0 2 z
  1268. [1 0 0 1 212 445]e
  1269. (Postscript box:)t
  1270. T
  1271. U
  1272. U
  1273. u
  1274. u
  1275. /_Times-Roman 12 12 0 2 z
  1276. [1 0 0 1 212 433]e
  1277. ()t
  1278. (Sometimes surrounded)t
  1279. T
  1280. U
  1281. U
  1282. u
  1283. u
  1284. /_Times-Roman 12 12 0 0 z
  1285. [1 0 0 1 138.0166 409]e
  1286. ( by a T)t
  1287. T
  1288. U
  1289. U
  1290. u
  1291. u
  1292. /_Times-Roman 12 12 0 0 z
  1293. [1 0 0 1 171.6728 406]e
  1294. (E)t
  1295. T
  1296. U
  1297. U
  1298. u
  1299. u
  1300. /_Times-Roman 12 12 0 0 z
  1301. [1 0 0 1 179.0029 409]e
  1302. (X box:)t
  1303. T
  1304. U
  1305. U
  1306. U
  1307. 0 G
  1308. 1 j [3 2 ]0 d
  1309. 226 448 m
  1310. 276 448 l
  1311. S
  1312. []0 d
  1313. 225.5 410.5 m
  1314. 275.5 410.5 l
  1315. S
  1316. %%PageTrailer
  1317. %%Trailer
  1318. _E end
  1319. %%EOF
  1320. %Beginning-Of-File-Named:psbREAD.ME
  1321. %                           PSBOX READ-ME
  1322. %                           -------------
  1323. % WHAT IS IT:
  1324. % psbox is a set of machine-independent TeX macros to
  1325. % 1) allow (Encapsulated) PostScript figure inclusion in all versions
  1326. %    of TeX (Plain, LaTeX) on all machines using a PostScript printer
  1327. % 2) facilitate the communication (e-mail, ftp, ...) of all the files
  1328. %    (text, macros, figs) needed to reproduce a TeX document by grouping
  1329. %    them together into a single, TeXable file.
  1330. %
  1331. % HOW TO GET IT TO WORK:
  1332. % 1) get the file psboxall.tex by one of the following ways:
  1333. %    -from outside CERN: ftp cs.nyu.edu(=128.122.140.24):pub/TeX/psbox/
  1334. %    -(if all else fails) send me a mail (orloff@surya11.cern.ch);
  1335. % 2) tex psboxall.tex: this will produce a complete documentation dvi and a
  1336. %    set of files, including the raw macros named psbox.tex;
  1337. % 3) adapt your psbox.tex to your system by uncommenting the appropriate
  1338. %    %\psfor...-line at the end of the file;
  1339. % 4) put it in your TeX Inputs directory
  1340. %
  1341. % MAJOR COMMANDS:
  1342. % \psbox{fname.eps}
  1343. %    makes a box having the right size to enclose the figure fname.eps;
  1344. % \psboxto(xdim;ydim){fn.eps}
  1345. %    makes a box of the given size and rescales fn.eps so that it just fits;
  1346. % \psboxto(\hsize;0pt){fn.eps}
  1347. %    has the maximal width & a height computed from a uniformal rescaling;
  1348. % \centinsert{\pscaption{\psbox{fn.eps}}{Fig 1: the caption...}}
  1349. %    recommended way to include a graphics between 2 paragraphs;
  1350. % \begin{figure}[hbt]\begin{center}\mbox{\psbox{fn.eps}}\caption{Fig 1:}
  1351. % \end{figure}
  1352. %    recommended way in LaTeX;
  1353. % \autojoin
  1354. %    makes a single file called psbjoint.tex containing the currently tex'd
  1355. %    file plus all the files (macros & figs) included since the \input of
  1356. %    psbox.tex. Texing psbjoint.tex will split it into all these files with
  1357. %    their original names (so think of PC's:12345678.123!!) and tex the
  1358. %    first one (generally the one that issued \autojoin).
  1359. %Beginning-Of-File-Named:psbug.tex
  1360.                    PSBOX bug-report form
  1361.                    ---------------------
  1362. From: 
  1363. To: orloff@surya11.cern.ch (Jean Orloff)
  1364. Subject: psbox BUG
  1365.  
  1366. YOU     Name:
  1367.         Email:
  1368. PSBOX   version no:
  1369.         source:
  1370. MACHINE type: (NeXT, Mac LC,...)
  1371.         Operating system:
  1372. TEX     name:
  1373.         version:
  1374. TEX->PS name: (dvips, TeXtures,...)
  1375.         version:
  1376. DRAWING program: (Adobe Illustrator, xfig,...)
  1377.         version:
  1378. PRINTER type:
  1379.     PostScript version:
  1380. PREVIEW for postscript (if any): (ghostscript,...)
  1381.  
  1382. Command(s) incriminated: (\psbox,\splitfile,...)
  1383. Problem description:
  1384.  
  1385.  
  1386.  
  1387.  
  1388. Log (TeX, TeX->PS, Printer) file(s) where you got insulted:
  1389.  
  1390. %Beginning-Of-File-Named:psboxOK.tex
  1391.                    PSBOX ANTI-bug report form
  1392.                    --------------------------
  1393. From: 
  1394. To: orloff@surya11.cern.ch (Jean Orloff)
  1395. Subject: psbox ANIT-BUG
  1396.  
  1397. PSBOX has been checked to work in the following environment:
  1398.  
  1399. MACHINE        TEX        TEX->PS        PRINTER/PREVIEWER
  1400. -------        ---        -------        -----------------
  1401. Macintosh*.*    TeXtures*.*            Apple LaserWriter (ALW)
  1402. "        OzTeX 1.3            ALW
  1403. UniX workst:    TeX 3.14t3    dvips 5.47    ALW
  1404.  SUN4        "        "        ALW
  1405.  NeXT        "        "        Preview
  1406.         "        dvialw        ALW
  1407. IBM370(VM/CMS)    TeX3.14/CMS1.3    DVItoPS        ALW
  1408. "        "        dvips 5.483    ALW
  1409. DOS PC        emTeX        dvips        GhostScript
  1410.  
  1411. If your system is not listed here but nevertheless works fine, please
  1412. add in a line, fill in the detailed form below and send it to me.
  1413.     
  1414. YOU     Name:
  1415.         Email:
  1416. PSBOX   version no:
  1417.         source:
  1418. MACHINE type: (NeXT, Mac LC,...)
  1419.         Operating system:
  1420. TEX     name:
  1421.         version:
  1422. TEX->PS name: (dvips, TeXtures,...)
  1423.         version:
  1424. DRAWING program: (Adobe Illustrator, xfig,...)
  1425.         version:
  1426. PRINTER type:
  1427.     version of PostScript used:
  1428. PREVIEW for postscript (if any): (ghostscript,...)
  1429.  
  1430.  
  1431.